<?php $this->view->partial('common/post_form'); ?>

<div id="postContainer">
<?php foreach ($feeds as $value) { ?>
	<!--wall post starts here-->

 <div id="<?= $value->uft->id ?>" class="wall-post large-12 columns">
	<div class="wall-head large-12 column">
		<div class="dp-tmb large-1 columns" style="background:url('<?= IMAGE_URL_SMALL.$value->uat->profile_pic ?>');background-size:cover;">
		</div>
		<div class="wall-info large-9 columns">
			<a href="<?= BASE_URI.'profile?bhd='.$value->uat->id; ?>"><?= $value->uat->fname.' '.$value->uat->lname ?></a>
			<p><small><i class="fa fa-clock-o"> <abbr class="timeago" title="<?= $value->uft->date_created ?>"></abbr></i></small></p>
		</div>
		<div class="extra large-1 column"></div>
	</div>
	<div class="wall-content large-12 column">
		<p><?= $value->uft->feed_title ?></p>
		<?= $value->uft->feed_container ?>
	</div>
	<div class="wall-att large-12 column">
	</div>
	<div class="likeshare large-12 column">
		<div class="large-6 column">
			<ul class="inline-list">
				<li><a id="feed_like_id_<?= $value->uft->id ?>" feed-like-id="<?= $value->uft->id ?>"class="btnLike"><?php if(FeedsLikesTb::checkIfLiked($value->uft->id,$this->session->get('user_id')) == true){
					echo "Unlike";
				}else{
					echo "Like";
				}
				?></a></li>
				<li><a>Comment</a></li>
				<li><a>Report</a></li>
			</ul>
		</div>
		<div class="text-right large-4 column">
			<p id="feeds_total_likes_<?= $value->uft->id ?>"><?= FeedsLikesTb::countLikes($value->uft->id) ?> People like this</p> 
		</div>
	</div>
	<div class="commentsection large-12 column">
		<div class="textareafrm">
			<textarea class="commentbox textarea-xpnd" id="<?= $value->uft->id ?>" receiver-id="<?= $value->uat->id ?>" placeholder="Comment"></textarea>
		</div>
		<div id="<?= 'feeds_comment_'.$value->uft->id ?>" class="commentarea large-12 column">
			<?php foreach (FeedsCommentsTb::find(array(
					"conditions"=>"feeds_id = ?0",
					"bind"=>array(0=>$value->uft->id)
				)) as $comment) { ?>
			<div id="<?= $comment->id ?>" class="usercomment large-12 column">
				<div class="dp-comment large-1 columns" style="background:url('<?= IMAGE_URL_SMALL.UserAccountTb::getProfilePicUrl($comment->user_id) ?>');background-size:cover;">
				</div>
				<div class="usercommentinfo large-11 column">
					<div class="large-12 column" style="padding:0;">
						<div class="large-10 column" style="padding:0;">
						<a href="<?=  BASE_URI.'profile?bhd='.$comment->user_id; ?>"><?= UserAccountTb::getFullname($comment->user_id); ?></a>&nbsp;&nbsp;<small><i class="fa fa-clock-o"> <abbr class="timeago" title="<?= $comment->date_created ?>"></abbr></i></small>	
						</div>	
						<div class="editicon large-2 column">
							<a class="editme"><i class="right fa fa-pencil-square-o"></i></a>
						</div>			
					</div>

					<p><?= $comment->comment_container ?></p>
				</div>
			</div>
			<?php } ?>
		</div>
	</div>
</div>	
<?php } ?>


</div> <!-- end of postContainer -->				

		<!--End wall post starts here-->
<div class="text-center large-12 columns" style="padding:0;margin-top:1.3rem;">
	<dl class="accordion" data-accordion> 
		<dd class="accordion-navigation"> <a href="#panel1">2013</a> 
		 	<div id="panel1" class="content"> 
		 		<h3>No Post to show</h3> 
		 	</div> 
		</dd>  
		<dd class="accordion-navigation"> <a href="#panel2">2012</a> 
		 	<div id="panel2" class="content"> 
		 		<h3>No Post to show</h3> 
		 	</div> 
		</dd>  
	</dl>
</div>


<script type="text/javascript"> var G_USER_ID = "<?= $_GET['bhd'] ?>"; </script>
<script type="text/javascript" src="<?=BASE_URI?>js/wall_posts.js"></script>



